package com.ruoyi.syf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.syf.domain.RiskShutdownRecord;
import com.ruoyi.syf.domain.vo.RiskShutdownRecordVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface RiskShutdownRecordMapper extends BaseMapper<RiskShutdownRecord> {

    /**
     * 查询开停工记录列表
     *
     * @param riskShutdownRecord 开停工记录
     * @return 开停工记录集合
     */
    public List<RiskShutdownRecordVo> list(RiskShutdownRecord riskShutdownRecord);

    /**
     * 删除开停工记录
     *
     * @param id 开停工记录主键
     * @return 结果
     */
    public int deleteRiskShutdownRecordById(Long id);

    /**
     * 批量删除开停工记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteRiskShutdownRecordByIds(Long[] ids);

    RiskShutdownRecord selectLastOne(@Param("objectId") Long objectId,@Param("unitId") Long unitId);

    /**
     * 上报
     */
    List<Map<String,Object>> escalation();

}
